<section class="section-info">
  <div>All select：{{ (lvTable.getSelection() | userProp) || 'none' }}</div>
  <div>Current select：{{ (lvTable.getRenderSelection() | userProp) || 'none' }}</div>
</section>
<section class="operation-group">
  <button lv-button (click)="addRow()">Add</button>
  <button lv-button (click)="lvTable.clearSelection()">Clear selection</button>
</section>

<lv-datatable [lvData]="data" #lvTable [lvPaginator]="page" lvSelectionMode="multiple" [lvSelection]="selection">
  <thead>
    <tr>
      <th width="40px" [class.lv-table-column-has-selection]="true">
        <label class="custom-checkbox" lv-checkbox (ngModelChange)="toggleSelection()" [ngModel]="isAllCheck" [lvIndeterminate]="isHalfCheck"></label>
      </th>
      <th lvCellKey="name">Name</th>
      <th lvCellKey="age">Age</th>
      <th lvCellKey="random">Random</th>
      <th lvCellKey="operation">Operation</th>
    </tr>
  </thead>
  <tbody>
    <ng-container *ngFor="let item of lvTable.renderData">
      <tr>
        <td>
          <label lv-checkbox class="lv-cell-checkbox" (ngModelChange)="selectionRow(item)" [ngModel]="isSelected(item)"></label>
        </td>
        <td>{{ item.name }}</td>
        <td>{{ item.age }}</td>
        <td>{{ item.random }}</td>
        <td (click)="deleteRow(item)"><a>Delete</a></td>
      </tr>
    </ng-container>
  </tbody>
</lv-datatable>
<lv-paginator #page lvPageSize="10" [lvPageSizeOptions]="pageSizeOptions"></lv-paginator>
<!-- <h3>属性说明：</h3>
<p class>设置lvSelectionMode修改单选多选模式，该属性接受'single'、'multiple'</p>
<h3>方法说明：</h3>
<p>注：一下方法都不包含disabled处理</p>
<p><b>getSelection()</b>获取全部选中项-全部</p>
<p><b>getRenderSelection()</b>获取当前渲染项选中项-当前渲染</p>
<p><b>toggleSelection(value: any)</b>切换选择项</p>
<p><b>bulkSelection(values: any[])</b>批量选中项</p>
<p><b>clearSelection()</b>清除所有-全部</p>
<p><b>clearRenderSelection()</b>清除所有-当前渲染</p>
<p><b>deleteSelection(values: any[])</b>批量删除项</p>
<p><b>isSelected(value: any)</b>是否选中</p>
<p><b>updateSelection()</b>更新表格selection</p> -->
